package com.yz.book.vo;


import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;

@Document(indexName = "esproduct",shards = 3,replicas = 2)
@Data
public class EsProduct implements Serializable {

    @Id
    private Integer id;

    @Field(name = "productName",analyzer = "ik_max_word",searchAnalyzer = "ik_max_word",type = FieldType.Text)
    private String productName;

    @Field(type = FieldType.Double)
    private BigDecimal productPrice;

    @Field(type = FieldType.Keyword)
    private String productImgsrc;

    @Field(type = FieldType.Integer)
    private Integer storeCount;

    @Field(type = FieldType.Integer)
    private Integer buyCount;


}


